<?php

namespace app\services\office;

use app\dao\office\OfficeClassDao;
use app\exceptions\AdminException;
use app\services\BaseService;

class OfficeClassService extends BaseService
{
    public function __construct(OfficeClassDao  $dao)
    {
        $this ->dao =$dao;
    }

    public function getList(array $where)
    {
        if ($where['title']) return  $this -> dao -> searchDao($where);
        return $this ->dao -> getList($where);
    }

    public function index(array $where)
    {
        return $this ->dao -> index($where);
    }

    public function create(array $where)
    {
        return $this ->dao ->create($where);
    }

    public function update(array $where)
    {
        return $this ->dao ->updateDao($where);
    }

    public function delete(array $where)
    {
        return $this -> dao ->deleteDao($where);
    }


    //------------------------------------------------api-------------------------------------------------------------
    /*
     * 获取课程
     */
    public function getClass(array $where){
        return $this->dao->getClass($where);

    }

}